<%@page contentType="text/html;charset=utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://smartstruts.org/taglib" prefix="smart"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv=Content-Type content="text/html; charset=utf-8" />
		<link href="../css/style.css" type="text/css" rel="stylesheet" />

	</head>
	<body topMargin="10">
		<div id="append_parent"></div>
		<table cellSpacing=6 cellPadding=2 width="100%" border="0">
			<tbody>
				<tr>
					<td>
						<table class="guide" cellSpacing="0" cellPadding="0" width="100%"
							border="0">
							<tbody>
								<tr>
									<td>
										&nbsp;
									</td>
								</tr>
							</tbody>
						</table>
						<br />



						<!-- 分页开始 -->
						<div class="pages">
							<em>共${requestScope.totalPages}页</em>
							<c:if test="${inboxForm.page gt 1}">
								<a href="inbox?page=${inboxForm.page-1}" class="next">&lsaquo;&lsaquo;</a>
							</c:if>
							<c:forEach begin="1" end="${requestScope.totalPages}" var="page">
								<c:choose>
									<c:when test="${inboxForm.page eq page}">
										<strong>${page}</strong>
									</c:when>
									<c:otherwise>
										<a href="inbox?page=${page}">${page}</a>
									</c:otherwise>
								</c:choose>
							</c:forEach>
							<c:if test="${inboxForm.page lt totalPages}">
								<a href="inbox?page=${inboxForm.page+1}" class="next">&rsaquo;&rsaquo;</a>
							</c:if>
							&nbsp;&nbsp;&nbsp;
						</div>
						<!-- 分页结束 -->

						<!-- 排序条件开始 -->
						<div>
							<select name="order"
								onchange="location='inbox?order='+this.value">
								<c:forEach items="${requestScope.orderOptions}" var="op">

									<c:choose>
										<c:when test="${inboxForm.order eq op.key}">
											<option value="${op.key}" selected="selected">
												${op.value}
											</option>
										</c:when>
										<c:otherwise>
											<option value="${op.key}">
												${op.value}
											</option>
										</c:otherwise>
									</c:choose>
								</c:forEach>
							</select>
						</div>
						<!-- 排序条件结束 -->

						<table class="tableborder" width="100%"
							style="border-collapse: collapse" cellpadding="8">
							<c:forEach items="${requestScope.msgList}" var="msg">
								<tr>
									<td width="15%" class="altbg1">
										<b>${msg.fromId.name}</b>
										<br />
										${msg.time}
									</td>
									<td class="altbg2">
										<b>${msg.title}</b>
										<br />
										${msg.content}
									</td>
								</tr>
							</c:forEach>

						</table>
						<br />
						<br />
						<br />
					</td>
				</tr>
			</tbody>
		</table>

	</body>
</html>
